# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'Usuario'
        db.create_table(u'ticket_usuario', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nome', self.gf('django.db.models.fields.CharField')(max_length=32)),
            ('login', self.gf('django.db.models.fields.CharField')(max_length=32)),
            ('senha', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('email', self.gf('django.db.models.fields.EmailField')(max_length=150)),
            ('data', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
        ))
        db.send_create_signal(u'ticket', ['Usuario'])

        # Adding model 'Empresa'
        db.create_table(u'ticket_empresa', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nome', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('data', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'ticket', ['Empresa'])

        # Adding model 'Maquina'
        db.create_table(u'ticket_maquina', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('nome', self.gf('django.db.models.fields.CharField')(default='', max_length=50)),
            ('ip', self.gf('django.db.models.fields.IPAddressField')(default='0.0.0.0', max_length=15)),
            ('processador', self.gf('django.db.models.fields.CharField')(default='', max_length=50)),
            ('memoria', self.gf('django.db.models.fields.IntegerField')(default=0, max_length=10)),
            ('sistema_operacional', self.gf('django.db.models.fields.CharField')(default='w', max_length=20)),
            ('unidade_medida', self.gf('django.db.models.fields.CharField')(default='mb', max_length=2)),
            ('empresa', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['ticket.Empresa'])),
        ))
        db.send_create_signal(u'ticket', ['Maquina'])

        # Adding model 'Chamado'
        db.create_table(u'ticket_chamado', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('codigo', self.gf('django.db.models.fields.IntegerField')(max_length=15)),
            ('titulo', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('problema', self.gf('django.db.models.fields.TextField')(max_length=1000)),
            ('solucao', self.gf('django.db.models.fields.TextField')(max_length=5000)),
            ('duracao', self.gf('django.db.models.fields.CharField')(max_length=10)),
            ('data', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('usuario', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ticket.Usuario'])),
            ('maquina', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ticket.Maquina'])),
        ))
        db.send_create_signal(u'ticket', ['Chamado'])


    def backwards(self, orm):
        # Deleting model 'Usuario'
        db.delete_table(u'ticket_usuario')

        # Deleting model 'Empresa'
        db.delete_table(u'ticket_empresa')

        # Deleting model 'Maquina'
        db.delete_table(u'ticket_maquina')

        # Deleting model 'Chamado'
        db.delete_table(u'ticket_chamado')


    models = {
        u'ticket.chamado': {
            'Meta': {'object_name': 'Chamado'},
            'codigo': ('django.db.models.fields.IntegerField', [], {'max_length': '15'}),
            'data': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'duracao': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'maquina': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['ticket.Maquina']"}),
            'problema': ('django.db.models.fields.TextField', [], {'max_length': '1000'}),
            'solucao': ('django.db.models.fields.TextField', [], {'max_length': '5000'}),
            'titulo': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'usuario': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['ticket.Usuario']"})
        },
        u'ticket.empresa': {
            'Meta': {'object_name': 'Empresa'},
            'data': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'nome': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'ticket.maquina': {
            'Meta': {'object_name': 'Maquina'},
            'empresa': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': u"orm['ticket.Empresa']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ip': ('django.db.models.fields.IPAddressField', [], {'default': "'0.0.0.0'", 'max_length': '15'}),
            'memoria': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '10'}),
            'nome': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
            'processador': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
            'sistema_operacional': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '20'}),
            'unidade_medida': ('django.db.models.fields.CharField', [], {'default': "'mb'", 'max_length': '2'})
        },
        u'ticket.usuario': {
            'Meta': {'object_name': 'Usuario'},
            'data': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '150'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'login': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
            'nome': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
            'senha': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['ticket']